package org.blogwu.learn.jvmlearn;

public class Main {
    public static void main(String[] args) {
        BB bb = new BB("SB", 1);
        change(bb);
        System.out.println(bb);
    }

    public static void change(BB bb) {
        bb = new BB("2B", 2);
    }
}

class BB {

    String name;
    int age;

    public BB(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "BB{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}

